/**
*      author: Y_Yao
*      created: 2024-12-13 18:16:46
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
const int N = 15 + 7;
int x[N],y[N];
int n;
bool vis[N];
double ans = INF;

double count(int i,int last)
{
    int x1 = x[i],y1 = y[i];
    int x2 = x[last],y2 = y[last];

    return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}

void dfs(int cur,double dist,int step,int last)
{
    if(step == n)
    {
        ans = min(ans,dist);
        return;
    }

    for(int i = cur + 1;i <= n;i++)
    {
        if(vis[i]) continue;
        vis[i] = true;
        double gap = count(i,last);
        dfs(i,gap + dist,step + 1,cur);
        vis[i] = false;
    }
}

void solve()
{
    cin >> n;
    for(int i = 1;i <= n;i++)
    {
        cin >> x[i] >> y[i]; 
    }

    dfs(0,0,0,0);
    cout << ans << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}